FUNCTION ZFIFM_VIM_DETERM_PO_AP_CHECK.
*"----------------------------------------------------------------------
*"*"本地接口：
*"  IMPORTING
*"     REFERENCE(IV_NO_UPDATE) TYPE  FLAG OPTIONAL
*"     REFERENCE(IV_PROC_TYPE) TYPE  /OPT/PROCESS_TYPE OPTIONAL
*"  EXPORTING
*"     REFERENCE(TAB_DSPMSG) TYPE  /OPT/STRUCT_MESSAGE_TABLE_T
*"  TABLES
*"      INDEX_ITEM TYPE  /OPT/CIDH_1ITEM_T
*"  CHANGING
*"     REFERENCE(INDEX_DATA) TYPE  /OPT/VIM_1HEAD OPTIONAL
*"  EXCEPTIONS
*"      CHECK_FAILED
*"----------------------------------------------------------------------

  "暂时没有用到

*  DATA:
*    LS_DSPMSG   TYPE /OPT/STRUCT_MESSAGE,
*    LV_ITEM_AMT TYPE /OPT/VIM_1HEAD-GROSS_AMOUNT,
*    LV_AMT_DIFF TYPE /OPT/VIM_1HEAD-GROSS_AMOUNT.
*
*  "金额不平检查
*  LOOP AT INDEX_ITEM INTO DATA(LS_INDEX_ITEM).
*    LV_ITEM_AMT = LV_ITEM_AMT + LS_INDEX_ITEM-WRBTR.
*  ENDLOOP.
*
*  LV_AMT_DIFF = INDEX_DATA-GROSS_AMOUNT - ( LV_ITEM_AMT + INDEX_DATA-VAT_AMOUNT ) - INDEX_DATA-UN_ALLOCATED_EXP.
*
*  LV_AMT_DIFF = ABS( LV_AMT_DIFF ).
*
*  IF LV_AMT_DIFF > 1.
*    CLEAR   LS_DSPMSG.
*    LS_DSPMSG-PROC_TYPE = IV_PROC_TYPE.
*    LS_DSPMSG-MSGTYP = 'E'.
*    LS_DSPMSG-MSGID = 'ZFI02'.
*    LS_DSPMSG-MSGNR = 001.
*    APPEND  LS_DSPMSG TO TAB_DSPMSG.
*  ENDIF.
*
*  IF INDEX_DATA-CUSTOM_FIELD4 IS INITIAL.
*    CLEAR   LS_DSPMSG.
*    LS_DSPMSG-PROC_TYPE = IV_PROC_TYPE.
*    LS_DSPMSG-MSGTYP = 'E'.
*    LS_DSPMSG-MSGID = 'ZFI02'.
*    LS_DSPMSG-MSGNR = 002.
*    APPEND  LS_DSPMSG TO TAB_DSPMSG.
*  ENDIF.
*
*  IF TAB_DSPMSG[] IS NOT INITIAL.
*    RAISE CHECK_FAILED.
*  ENDIF.
ENDFUNCTION.
